<!DOCTYPE html>
<html>
<head lang="en">
    <meta charset="UTF-8">
    <title>Media Queries</title>
    <style>
        .div1{
            width: 400px;
            height: 200px;
        }
        @media screen and (max-width: 900px){
            .div1{
                background-color:yellow;
            }
        }
        @media screen and (max-width: 600px){
            .div1{
                background-color:red;
            }
        }
    </style>
</head>
<body>
    <h3>Media Queries</h3>
    <h5><a href="http://www.w3cplus.com/content/css3-media-queries" target="_blank">参考资料</a> </h5>
    <hr/>
    <div class="div1">
        改变浏览的宽度，请注意我的背景
    </div>
</body>
</html>